package com.qiyuan.boot.web.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qiyuan.boot.web.bean.BlogCarousel;
import com.qiyuan.boot.web.mapper.CarouselMapper;
import com.qiyuan.boot.web.service.CarouselService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author qiyuan
 * @time 2022-03-28
 */
@Service
public class CarouselServiceImpl extends ServiceImpl<CarouselMapper, BlogCarousel> implements CarouselService {

    @Resource
    private CarouselMapper carouselMapper;

    @Override
    public List<BlogCarousel> selectList() {
        QueryWrapper<BlogCarousel> carouselQueryWrapper = new QueryWrapper<>();
        carouselQueryWrapper.lambda().eq(BlogCarousel::getStatus,0);
        return carouselMapper.selectList(carouselQueryWrapper);
    }
}
